//
//  PhoneNumberValidator.m
//  策略模式
//
//  Created by YuanJiang on 2019/9/5.
//  Copyright © 2019 llbt. All rights reserved.
//

#import "PhoneNumberValidator.h"

@implementation PhoneNumberValidator

-(BOOL)validateIput:(UITextField *)tf
{
    if (tf.text.length <=0) {
        self.errorMessage = @"手机号没有输入";
    }else{
        if (tf.text.length != 11) {
            self.errorMessage = @"手机号格式不对";
        }else{
            self.errorMessage = @"";
        }
    }
    NSLog(@"=========%@",self.errorMessage);
    return self.errorMessage.length?NO:YES;
}

@end
